package net.pimpas.xml.serviceprovider;

import java.io.File;
import java.io.InputStream;
import java.io.Reader;
import java.net.URL;
import java.util.List;

import net.pimpas.core.serviceprovider.ServiceProvider;
import net.pimpas.xml.attribute.Attribute;
import net.pimpas.xml.exception.XmlAccessException;
import net.pimpas.xml.exception.XmlParseException;
import net.pimpas.xml.node.Node;

public interface XmlServiceProvider extends ServiceProvider {

	void parse(File f) throws XmlParseException;
	void parse(InputStream input) throws XmlParseException;
	void parse(Reader reader) throws XmlParseException;
	void parse(URL url) throws XmlParseException;
	
	List<Node> getChildrens(String name) throws XmlAccessException;
	List<Node> getChildrens(Node undefined, String name) throws XmlAccessException;
	
	Attribute getAttribute(Node undefined, String attName) throws XmlAccessException;
	List<Attribute> getAttributes(Node undefined) throws XmlAccessException;
	
	Node getFirstNode(Node t, String childName) throws XmlAccessException;
	
	String print( ) throws XmlAccessException;
}